<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/include.inc.jsp"%>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="" />
<link href="${ctx}/easy-ui/themes/default/easyui.css" rel='stylesheet' type='text/css' />
<link href="${ctx}/css/login-style.css" rel='stylesheet' type='text/css' />
<script src="${ctx}/js/jquery-2.2.4.min.js"></script>
<script src="${ctx}/easy-ui/jquery.easyui.min.js" type="text/javascript"></script>  
<script src="${ctx}/easy-ui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>  
</head>
<body  style="overflow-x: hidden;overflow-y: hidden">
<div class="login-form">
	<div class="head-info">
		<label class="lbl-1"> </label>
		<label class="lbl-2"> </label>
		<label class="lbl-3"> </label>
	</div>
	<div class="clear"> </div>
	<div class="avtar"><img src="${ctx}/images/login/avtar.png" /></div>
	<form action="${ctx}/common/login/login" method="post" id="loginForm">
		<input type="text" class="text" value="username" name="username" onFocus="this.value = '';" 
		onBlur="if (this.value == '') {this.value = '';}" />
		<div class="key"><input type="password" value="password" name="password" onFocus="this.value = '';"
		onBlur="if (this.value == '') {this.value = '';}" />
		</div>
	</form>
	<div class="signin"><input type="submit" value="Login" id="submitFormId"/></div>
</div>
<div class="copy-rights">
	<p>Copyright &copy; 2016.Company name All rights reserved.
	</p>
</div>
<script type="text/javascript">
$(function(){
	 $("body").keyup(function(){
		 if(event.keyCode == 13){
			 var username = $("input[name='username']").val();
			 if(username == '' || username=='username'){
				 $.messager.alert('Warning','请输入账号');
				 return false ;
			 }
			 var password = $("input[name='password']").val();
			 if(password == '' || password=='password'){
				 $.messager.alert('Warning','请输入密码');
				 return false ;
			 }
			 $("#loginForm").submit();
	      }
	 });
	 
	 $("#submitFormId").click(function(){
		 var username = $("input[name='username']").val();
		 if(username == '' || username=='username'){
			 $.messager.alert('Warning','请输入账号');
			 return false ;
		 }
		 var password = $("input[name='password']").val();
		 if(password == '' || password=='password'){
			 $.messager.alert('Warning','请输入密码');
			 return false ;
		 }
		 $("#loginForm").submit();
	 });
});
</script>
</body>
</html>